#pragma once
#include "shapebuilder.h"

#define EXTRUDE_GUID _T("F4871B40-A918-4525-9287-F2B40C92D475")
class TFunction_Logbook;
class CExtrudeInfo : public CShapeInfo
{
public:
	CExtrudeInfo();
	~CExtrudeInfo();
	virtual void Reset(void);

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
	//-----------------------------------
	TopoDS_Shape pShape;
	gp_Dir		dirNormal;
	Standard_Real dHeight;
	//----------------------------------
	enum PARAM_INDEX_EXTRUDE
	{
		IDX_START = 0,

		SHAPE = 1,
		DIRECTION = 2,
		DIR_X = DIRECTION,
		DIR_Y,
		DIR_Z,
		HEIGHT = 5,

		IDX_END
	};
};


class CExtrudeBuilder :
	public CShapeBuilder
{
public:
	CExtrudeBuilder(void);
	~CExtrudeBuilder(void);

	bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	bool Build(CExtrudeInfo* pShapeInfo, TopoDS_Shape& shape);
};